package com.vegetable.modules.service.outbound;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.vegetable.modules.entity.outbound.AllocationIn;
import com.vegetable.modules.entity.outbound.AllocationOrder;
import com.vegetable.modules.entity.outbound.AllocationOut;
import com.vegetable.modules.entity.outbound.po.AllocationInAddPO;
import com.vegetable.modules.entity.outbound.po.AllocationOrderAddPO;
import com.vegetable.modules.entity.outbound.po.AllocationOrderQueryPO;
import com.vegetable.modules.entity.outbound.po.AllocationOutAddPO;

/**
 * <p>
 * 调拨单 服务类
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-27
 */
public interface IAllocationOrderService extends IService<AllocationOrder> {
    /**
     * 新增调拨订单
     * @param po
     * @return
     */
    int addOrder(AllocationOrderAddPO po);

    /**
     * 查询调拨订单列表
     * @param po
     * @return
     */
    IPage<AllocationOrder> allocationList(AllocationOrderQueryPO po);

    IPage<AllocationIn> allocationInList(AllocationOrderQueryPO po);

    IPage<AllocationOut> allocationOutList(AllocationOrderQueryPO po);

    AllocationOrder queryOrder(Long orderId);

    AllocationIn queryInOrder(Long orderId);

    AllocationOut queryOutOrder(Long orderId);

    AllocationIn saveAllocationIn(AllocationInAddPO po) throws Exception;

    int saveAllocationOut(AllocationOutAddPO po) throws Exception;

    void submitAllocationIn(AllocationInAddPO po) throws Exception;

    void submitAllocationOut(AllocationOutAddPO po) throws Exception;

    void deleteOrder(Long id) throws Exception;
}
